#!/bin/bash

echo '安装插件'
dirs=$(ls init/es/plugins)

for file in $dirs; do
  docker exec -it elasticsearch elasticsearch-plugin install file:///tmp/plugins/$file
done

echo '启动容器'
docker-compose restart elasticsearch
